(self.webpackChunkpromptmanager=self.webpackChunkpromptmanager||[]).push([[7609],{87609:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ge}});var i=t(29439),o=t(72791),r=t(25671),l=t(10757),s=t(61889),a=t(13239),c=t(57689),d=t(56030),p=t(12705),u=t(14916),h=t(83099),x=t(87309),f=t(49428),g=t(2964),m=t(30914),y=t(66106),j=t(68406),_=t(93044),S=t(15473),v=t(90493),C=t(15021),E=t(76278),Z=t(49900),b=t(48586),T=t(11890),k=t(39045),O=t(92414),P=t(68961),A=t(20681),w=t(78222),D=t(91665),R=t(74165),I=t(15861),H=t(7543),W=t(80184),N=function(){var e=(0,I.Z)((0,R.Z)().mark((function e(){return(0,R.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,H.qC)("/api/logout",{},(function(){}),(function(e){window.location.reload()}),(function(){}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();var L=t(5289),K=t(65661),z=t(39157),F=t(51691),U=t(64554),B=t(24518),M=t(97123);function V(e){var n=e.visibility,t=e.handleCancelCb,i=e.data,o=e.title,r=e.message,l=function(){i&&localStorage.setItem("shareCode",i),window.location.href="/login"};return(0,W.jsxs)(L.Z,{title:o||"Logged Out",open:n,onCancel:t,footer:null,children:[(0,W.jsx)(K.Z,{id:"logged-out-modal-title",children:"Logged Out"}),(0,W.jsx)(z.Z,{children:(0,W.jsx)(F.Z,{children:(0,W.jsx)(U.Z,{children:r||(0,W.jsxs)("p",{children:["You are logged out. Please"," ",(0,W.jsx)(B.Z,{type:"link",onClick:l,style:{padding:"0px"},children:"login"})," ","or"," ",(0,W.jsx)(B.Z,{type:"link",onClick:l,style:{padding:"0px"},children:"signup"})," ","to proceed."]})})})}),(0,W.jsx)(M.Z,{children:(0,W.jsx)(B.Z,{onClick:t,children:"Close"})})]})}var Y=t(90766)("./".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SITE_NAME?{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SITE_NAME.toLowerCase():"llmstack","-icon.png")),J=u.Z.Panel,G=r.Z.Sider,q={textAlign:"center",lineHeight:"20px",color:"#000",backgroundColor:"#ffdfb21c",width:"50px",borderRight:"solid 1px #ccc"},Q={width:"54px",borderRadius:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SITE_NAME?"5px":"inherit",border:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SITE_NAME?"solid 1px #183a58":"inherit"},X={color:"#000"};function $(e){var n=e.menuItems,t=(0,c.TH)(),r=(0,c.s0)(),l=(0,d.sJ)(p.nC),s=(0,o.useState)(!1),a=(0,i.Z)(s,2),u=a[0],f=a[1],g=function(e){return t.pathname.startsWith(e)&&"/"!==e||"/"===e&&"/"===t.pathname||"/"===e&&t.pathname.startsWith("/apps")};return(0,W.jsx)(h.Z,{direction:"vertical",style:{padding:"15px 0",width:"100%"},children:n.map((function(e){return(0,W.jsxs)("div",{style:g(e.link)?{boxShadow:"inset 3px 0 0 #6a4ea8"}:{},children:[(0,W.jsxs)("a",{href:e.link,style:X,onClick:function(n){n.preventDefault(),l?r(e.link):f(!0)},children:[(0,W.jsx)("span",{style:g(e.link)?{fontSize:"28px",color:"#385090"}:{fontSize:"28px"},children:(n=e.label,{Playground:(0,W.jsx)(b.Z,{}),Home:(0,W.jsx)(T.Z,{}),History:(0,W.jsx)(k.Z,{}),Settings:(0,W.jsx)(O.Z,{}),Discover:(0,W.jsx)(P.Z,{}),Apps:(0,W.jsx)(A.Z,{}),Data:(0,W.jsx)(w.Z,{}),Organization:(0,W.jsx)(D.Z,{})}[n])}),(0,W.jsx)("p",{style:{fontSize:"12px",margin:"4px 0"},children:e.label})]}),(0,W.jsx)(V,{visibility:!l&&u,handleCancelCb:function(){return f(!1)},title:"Logged Out",message:(0,W.jsxs)("p",{children:["You are logged out. Please"," ",(0,W.jsx)(x.ZP,{type:"link",onClick:function(){return window.location.href="/login"},style:{padding:"0px"},children:"login"})," ","to proceed."]})})]},e.key);var n}))})}function ee(e){var n,t=e.menuItems,r=(0,c.s0)(),l=(0,o.useState)(!1),s=(0,i.Z)(l,2),a=s[0],x=s[1],b=(0,d.sJ)(p.nC),T=(0,d.sJ)(p.rc),k=(0,o.useState)(!1),O=(0,i.Z)(k,2),P=O[0],A=O[1],w=(0,o.useState)(null),D=(0,i.Z)(w,2),R=D[0],I=D[1],H=function(){return(0,W.jsxs)(f.Z,{title:"Welcome to Promptly",open:a,onCancel:function(){return x(!1)},footer:null,width:900,children:[(0,W.jsx)("br",{}),(0,W.jsx)(g.Z,{message:(0,W.jsxs)("p",{children:["You can find the platform documentation at"," ",(0,W.jsx)("a",{href:"https://docs.trypromptly.com",target:"_blank",rel:"noreferrer",children:"https://docs.trypromptly.com"})]}),type:"info",showIcon:!0})," ",(0,W.jsx)("br",{}),(0,W.jsx)(h.Z,{style:{textAlign:"center",width:"100%",justifyContent:"center"},children:(0,W.jsx)("video",{src:"https://storage.googleapis.com/trypromptly-static/static/images/promptly-app-builder-demo.mp4",controls:!0,autoPlay:!0,muted:!0,loop:!0,style:{maxWidth:"800px"}})}),(0,W.jsx)("h3",{children:"Frequently Asked Questions"}),(0,W.jsxs)(u.Z,{defaultActiveKey:["1"],accordion:!0,children:[(0,W.jsx)(J,{header:"Where do I add my Open AI and other provider keys",children:(0,W.jsx)("p",{children:"Use Settings on the sidebar to add Open AI and other available provider keys"})},"1"),(0,W.jsx)(J,{header:"How do I get my PROMPTLY_API_KEY",children:(0,W.jsx)("p",{children:"Your Promptly API key is available in your profile. Click on Setting icon on the sidebar and you will find your token"})},"2"),(0,W.jsx)(J,{header:"I need help. Where do I get more information?",children:(0,W.jsxs)("p",{children:["You can reach out to us at"," ",(0,W.jsx)("a",{href:"mailto:contact@trypromptly.com",children:"contact@trypromptly.com"}),". Alternatively, you can also contact us on our Twitter handle"," ",(0,W.jsx)("a",{href:"https://twitter.com/trypromptly",rel:"noreferrer",target:"_blank",children:"@trypromptly"})]})},"3")]})]})};return(0,W.jsx)(G,{style:q,width:80,children:(0,W.jsxs)(m.Z,{style:{height:"100%"},children:[(0,W.jsx)(y.Z,{align:"top",style:{justifyContent:"center",lineHeight:"80px"},children:(0,W.jsx)("a",{href:"/apps",onClick:function(e){e.preventDefault(),r("/apps")},children:(0,W.jsx)(j.Z,{style:Q,src:Y,preview:!1})})}),(0,W.jsx)(y.Z,{style:{justifyContent:"center"},children:(0,W.jsx)($,{menuItems:t})}),(0,W.jsxs)(y.Z,{style:{position:"absolute",bottom:"5px",padding:"10px 0",justifyContent:"center",width:"100%"},children:[T&&T.avatar?(0,W.jsx)(_.Z,{alt:T.name,src:T.avatar,sx:{width:42,height:42,cursor:"pointer",border:"1px solid #728bd0"},onClick:function(e){I(e.currentTarget),A(!0)},"aria-describedby":"profile-popover"}):(0,W.jsx)(_.Z,{sx:{width:42,height:42,cursor:"pointer",border:"1px solid #728bd0"},onClick:function(e){I(e.currentTarget),A(!0)},"aria-describedby":"profile-popover",children:"".concat((null===T||void 0===T||null===(n=T.name)||void 0===n?void 0:n.split(" ").map((function(e){return e[0]})).join(""))||"P")}),(0,W.jsx)(S.ZP,{id:"profile-popover",anchorEl:R,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"},open:P,onClose:function(){return A(!1)},children:(0,W.jsxs)(v.Z,{children:[(0,W.jsx)(C.ZP,{disablePadding:!0,children:(0,W.jsx)(E.Z,{component:"a",href:"https://docs.trypromptly.com",target:"_blank",children:(0,W.jsx)(Z.Z,{primary:"Docs"})})}),(0,W.jsx)(C.ZP,{disablePadding:!0,children:(0,W.jsx)(E.Z,{component:"a",href:"https://discord.gg/3JsEzSXspJ",target:"_blank",children:(0,W.jsx)(Z.Z,{primary:"Help"})})}),b&&(0,W.jsx)(C.ZP,{disablePadding:!0,children:(0,W.jsx)(E.Z,{component:"a",onClick:N,children:(0,W.jsx)(Z.Z,{primary:"Logout"})})})]})})]}),(0,W.jsx)(H,{})]})})}var ne=t(84395),te=t(34663),ie=t(13400),oe=t(71715),re=t(23786),le=t(50533),se=t(7607),ae=t(90766)("./".concat({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SITE_NAME?{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_SITE_NAME.toLowerCase():"llmstack","-icon.png")),ce={width:"100%",color:"#000",backgroundColor:"#ffdfb21c",borderBottom:"solid 1px #ccc"};function de(e){var n=e.menuItems,t=o.useState(null),r=(0,i.Z)(t,2),l=r[0],s=r[1],a=function(){s(null)};return(0,W.jsx)(ne.Z,{position:"static",color:"transparent",elevation:1,style:ce,children:(0,W.jsxs)(te.Z,{sx:{display:"flex",justifyContent:"space-between"},children:[(0,W.jsx)(ie.Z,{edge:"start",color:"inherit",href:"/",onClick:function(e){e.preventDefault(),window.location.href="/"},children:(0,W.jsx)("img",{src:ae,alt:ae,width:"32px"})}),(0,W.jsx)(ie.Z,{edge:"end",color:"inherit",onClick:function(e){s(e.currentTarget)},children:(0,W.jsx)(se.Z,{})}),(0,W.jsx)(oe.Z,{anchorEl:l,open:Boolean(l),onClose:a,children:n.map((function(e){return(0,W.jsx)(re.Z,{onClick:a,children:(0,W.jsx)(le.Z,{href:e.link,underline:"none",children:e.label})},e.key)}))})]})})}var pe=r.Z.Content,ue={textAlign:"center",height:"100%",paddingBottom:"50px",backgroundColor:"#fff",overflow:"auto"};function he(e){var n=e.children;return(0,W.jsx)(pe,{style:ue,children:n})}var xe=t(58518),fe=[{key:"4",label:"Apps",link:"/"},{key:"1",label:"Playground",link:"/playground"},{key:"6",label:"Discover",link:"/hub"},{key:"7",label:"Data",link:"/data"},{key:"3",label:"History",link:"/history"},{key:"5",label:"Settings",link:"/settings"}];function ge(e){var n=e.children,t=(0,c.TH)();(0,o.useEffect)((function(){l.ZP.initialize("G-WV60HC9CHD"),l.ZP.send({hitType:"pageview",page:t.pathname+t.search,title:t.pathname})}),[t]);var u=(0,d.FV)(p.lo),h=(0,i.Z)(u,2),x=h[0],f=h[1],g=(0,d.sJ)(p.Dg);return(0,o.useEffect)((function(){var e=function(){f(window.innerWidth<900)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[f]),(0,W.jsxs)("div",{id:"app-container",children:[(0,W.jsx)(xe.wT,{maxSnack:3,autoHideDuration:3e3,anchorOrigin:{horizontal:"center",vertical:"top"}}),x&&(0,W.jsx)(de,{menuItems:[].concat(fe,[{key:"9",label:"Docs",link:"https://docs.trypromptly.com"}]).concat(g.IS_ORGANIZATION_OWNER?[{key:"8",label:"Organization",link:"/organization"}]:[])}),(0,W.jsxs)(r.Z,{style:{height:"100vh"},children:[!x&&(0,W.jsx)(ee,{menuItems:fe.concat(g.IS_ORGANIZATION_OWNER?[{key:"8",label:"Organization",link:"/organization"}]:[])}),(0,W.jsx)(o.Suspense,{fallback:(0,W.jsx)(s.ZP,{sx:{margin:"auto"},children:(0,W.jsx)(a.Z,{})}),children:(0,W.jsx)(he,{children:n})})]}),(0,W.jsx)("div",{dangerouslySetInnerHTML:{__html:'<promptly-app-embed published-app-id="f4d7cb50-1805-4add-80c5-e30334bce53c" width="100px" chat-bubble="true"></promptly-app-embed>'}})]})}},90766:function(e,n,t){var i={"./llmstack-icon.png":98713,"./promptly-icon.png":7675};function o(e){var n=r(e);return t(n)}function r(e){if(!t.o(i,e)){var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=r,e.exports=o,o.id=90766},98713:function(e,n,t){"use strict";e.exports=t.p+"static/media/llmstack-icon.3187cb2a29458e7b5e0c.png"},7675:function(e,n,t){"use strict";e.exports=t.p+"static/media/promptly-icon.e12fae5f2a52807aaea3.png"}}]);
//# sourceMappingURL=7609.1704a773.chunk.js.map